
package JET.Events;

/**
 *
 * @author 057Ry
 */
public interface BodyEventNotifier {

    ////////////////////////////////////////////////////////////////////////////
    //                         L I S T E N E R S                              //
    ////////////////////////////////////////////////////////////////////////////

    /**
     * Adds new body event listener.
     *
     * @param listener Listener to be added.
     */
    void addBodyEventListener(BodyEventListener listener);

    /**
     * Removes specified body event listener.
     * 
     * @param listener Listener to be removed.
     */
    void removeBodyEventListener(BodyEventListener listener);

    /**
     * Removes all body event listeners.
     */
    void removeAll();

    ////////////////////////////////////////////////////////////////////////////
    //                        N O T I F I C A T I O N                         //
    ////////////////////////////////////////////////////////////////////////////

    /**
     * Notifies that new collision occured.
     *
     * @param evt Event to be passed to listeners, with details of collision.
     */
    void notifyCollisionDetected(BodyEvent evt);

    /**
     * Notifies that collision finished.
     *
     * @param evt Event to be passed to listeners, with details of collision.
     */
    void notifyCollisionFinished(BodyEvent evt);
}
